<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>管理 | 热门话题</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="stylesheet" href="/static/libs/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/libs/dropzone.css">
    <link rel="stylesheet" href="/static/css/cms.css">
    <script type="text/javascript" src="/static/js/jquery.min.js"></script>
    <script src="/static/libs/bootstrap/js/bootstrap.min.js"></script>
    <script src="/static/js/underscore-min.js"></script>
    <script src="/static/libs/dropzone/dropzone.js"></script>
    <script src="/static/js/uuid.js"></script>
    <script src="/static/js/cms/topic-gallery.js"></script>
</head>
<body>
<header class="navbar navbar-default navbar-static-top" id="top">
    <div class="container">
        <div class="navbar-header">
            <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#bs-navbar"
                    aria-controls="bs-navbar" aria-expanded="false">
                <span class="sr-only">展开/收起</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a href="/" class="navbar-brand">石头人</a>
        </div>
        <nav id="bs-navbar" class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li>
                    <a href="/cms/topic">话题</a>
                </li>
                <li class="active">
                    <a href="/cms/topic/gallery">热门话题</a>
                </li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li>
                    <a href="#">没办法更帅的程序员</a>
                </li>
            </ul>
        </nav>
    </div>
</header>
<div class="container">
    <div class="panel panel-default">
        <div class="panel-heading clearfix">
            <h5>公共频道</h5>
            <div class="pull-right">
                <button class="btn btn-sm btn-warning" id="refresh-g">刷新</button>
                <button class="btn btn-sm btn-primary" id="submit-g">保存</button>
                <button class="btn btn-sm btn-default" id="cancel-g">取消</button>
            </div>
        </div>
        <div class="panel-body">
            <div class="gallery-list row">

            </div>
            <div>
                <a href="#" class="new-gallery">新建</a>
            </div>
            <div class="panel panel-default new-gallery-panel" style="display: none">
                <div class="panel-body">
                    <div class="">
                        频道：公共
                    </div>
                    <label>类型:</label>
                    <div class="form-inline">
                        <div class="radio">
                            <label>
                                <input type="radio" name="new-type" value="0" checked>
                                &nbsp;0.推荐
                            </label>
                        </div>
                        <div class="form-group">
                            <label for="sugg-topic">推荐topicid</label>
                            <input type="text" class="form-control" id="sugg-topic" placeholder="推荐topicid">
                        </div>
                    </div>
                    <div class="radio">
                        <label>
                            <input type="radio" name="new-type" value="1">
                            1.公共最热
                        </label>
                    </div>
                    <div class="radio">
                        <label>
                            <input type="radio" name="new-type" value="2">
                            2.当前频道最热
                        </label>
                    </div>
                    <div class="radio">
                        <label>
                            <input type="radio" name="new-type" value="3">
                            3.随机
                        </label>
                    </div>
                    <button class="btn btn-primary add-gallery">提交</button>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/template" id="topic-gallery-template">
    <div class="col-md-3 gallery-panel">
        <div class="panel panel-default">
            <div class="panel-body hot-info">
                <div>类型：<%- type2txt[gtype] %></div>
                <% if(gtype == 0) { %>
                <div>topicid: <%- remark %></div>
                <% } %>
                <input type="hidden" name="gtype" value="<%- gtype %>">
                <input type="hidden" name="remark" value="<%- remark %>">
                <div><a class="del-gallery" href="#">删除</a></div>
            </div>
        </div>
    </div>
</script>
</body>
</html>
